1. Field of the Invention
This invention relates to binding user interface objects to application objects.
2. Background Art
Developing software applications to be used on the Internet is difficult and complex. There is a need for tools to make it easier for a software developer to create such applications. The problem in developing Internet applications can be understood by examining the Internet and current tools for creating programs.
The Internet is a worldwide network of interconnected computers. An Internet client accesses a computer on the network via an Internet provider. An Internet provider is an organization that provides a client (e.g., an individual or other organization) with access to the Internet (via analog telephone line or Integrated Services Digital Network line, for example). A client can, for example, download a file from or send an electronic mail message to another computer/client using the Internet. An Intranet is an internal corporate or organizational network that uses the same communications protocols as the Internet.
Internet Access
The World Wide Web (WWW) facilitates access to the Internet using several protocols including the Hypertext Transfer Protocol (HTTP). The WWW can be used to access text and other forms of information such as graphics, pictures, and sound. Components of the WWW include browser software, network links, and servers. The browser software, or browser, is a user-friendly interface (i.e., front-end) that simplifies access to the Internet. A browser allows a client to communicate a request without having to learn a complicated command syntax, for example. A browser typically provides a graphical user interface (GUI) for displaying information and receiving input. Examples of browsers currently available include Netscape's Navigator Gold 3.0 and Microsoft's Internet Explorer.
Information servers provide information on the WWW in response to a client request. Hypertext Transport Protocol (HTTP) is a standard protocol for communication with an information server on the WWW HTTP provides communication methods that allow clients to request data from a server and send information to the server.
HTML Definitional Language
A browser displays information to a client/user as pages or documents. The Hypertext Markup Language (HTML) is used to define the format for a page to be displayed on the WWW. A WWW page is transmitted to a client as an HTML document. The browser executing at the client parses the document and generates and displays a page based on the information specified in the HTML document.
HTML is a structural language that is comprised of HTML elements that are nested within each other. An HTML document is a text file in which certain strings of characters, called tags, mark regions of the document and assign special meaning to them. These regions are called HTML elements. Each element has a name, or tag. Examples of elements include unordered lists, text boxes, check boxes, and radio buttons. Each of these elements can have attributes that specify properties of the element such as name, type, and value. The following provides an example of the structure of an HTML document:
<HTML><HEAD>.... element(s) valid in the document head</HEAD><BODY>.... element(s) valid in the document body</BODY></HTML>
Each HTML element is delimited by the pair of characters “<” and “>”. The name of the HTML element is contained within the delimiting characters. The combination of the name and delimiting characters is referred to as a marker, or tag. Each element is identified by its marker. In most cases, each element has a start and ending marker. The ending marker is identified by the inclusion of an another character, “/” that follows the “<” character.
HTML is a hierarchical language. With the exception of the main HTML element which encompasses the entire HTML document, all other elements are contained within another element. The HTML element encompasses the entire document. The main HTML element identifies the enclosed text as an HTML document. The HEAD element is contained within the main HTML element and includes information about the HTML document. The BODY element is contained within the main HTML element. The BODY element contains all of the text and other information to be displayed. Other HTML elements are described in an HTML reference manual such as Scharf, D., HTML, Visual Quick Reference, Que Corporation (1995).
Mechanisms exist for developing Web applications that allow a user to interact with an application running on a remote processor as though the user's computer terminal was hardwired to the remote processor. That is, traditional networked applications are being ported to the Internet to allow remote access to the application via the Internet. The WebObjects product from NeXT Software, Inc. is an example of a set of tools that can be used to develop and run Web applications.
An application can be ported to the Web by creating HTML definitions for the application's user interface. A Web application exhibits a back-end state (e.g., stored data, runtime data, and logic). The HTML definitions that are used primarily for the application's user interface must be dynamic to reflect the changing back-end state. The back-end state must be able to be bound to the HTML definitions such that the application's logic can dynamically generate (or modify) the HTML definitions. The WebObjects product provides the ability to define the bindings in a plain text, or ASCII, file. The application developer writes a set of statements in a text file that are interpreted to determine the bindings. There is, however, no tool that provides an environment for interactively defining the bindings using a graphical user interface (GUI) and for generating the binding statements.
HTML allows hypertext links to be embedded in an HTML document that allow a user to interactively initiate transactions at server computers via the WWW. Minimal state information about such transactions is retained within an HTML document. It would be beneficial to use object-oriented HTML elements to manage a series of transactions and to maintain state information across transactions. It would be beneficial to be able to generate HTML documents dynamically using information from a previous transaction, corporate data, and data retained in HTML element objects. It would be beneficial to be able to share application development across applications.
As described more fully in U.S. patent application entitled Method and Apparatus for Generating Object-Oriented World Wide Web Pages, Ser. No. 08/515,057, filed on Aug. 14, 1995, assigned to the assignee of the present invention, and incorporated herein by reference, a capability exists for generating and manipulating WWW pages programmatically using object classes in an object-oriented environment. Classes of objects are defined for each HTML element. Properties of an HTML element are stored in instance variables of an object class. An object class can include methods to manipulate an HTML element. For example, an object class can include a method for generating the HTML for the element in a Web page definition.
Component
Self-contained modules, or components, are described in U.S. patent application entitled Method and Apparatus for Developing and Managing Transactions, Ser. No. 08/532,491, filed on Sep. 22, 1995, assigned to the assignee of the present invention, and incorporated herein by reference. Such a component can be used in one or more Web pages across multiple applications to provide definition for the Web page. A component can represent an entire page or some portion of a page.
Resources such as a template, association, and custom logic can be associated with a component. An HTML template, for example, can provide a layout or description of the Web page. An HTML template can include some or all of the HTML definition for the Web page, for example. The template can further identify a dynamic element that can be used to generate the definition for an HTML element. Like an HTML element specification in an HTML document, a dynamic element is identified using a tag. The dynamic element's entry in the template can further specify attributes for an instance of the object class.
Custom logic can be a program written in a script, Objective C, or other programming language that can be used to generate and control a Web page at runtime. For example, custom logic can generate an HTML definition for a requested Web page using an HTML template together with a runtime, or back-end, state of a client or server process. Thus, certain portions of the Web page can be defined prior to runtime while other portions are dynamically created at runtime.
Associations of a component can be used to provide a binding between the definitional elements (e.g., HTML elements) included in a Web page specification (e.g., HTML definition file) and the back-end state of a client or server process. For example, a text or ASCII file can be created using a text editor that contains statements that associate attributes of an HTML element with variables declared in the custom logic. Currently, a WWW application developer must specify these associations by writing statements using a declarative language syntax such as value=employee.fn where value is an attribute of an HTML element, employee is the variable and fn is a field of the employee variable. In the prior art, there is no mechanism for graphically specifying or viewing bindings between a Web page definition and custom logic.